1. Field of the Invention
The present invention relates to recording and/or playback of digital data, and more particularly, to a method for generating additional information for guaranteeing seamless playback between data streams which are composed of packetized data, a recording medium for storing the information, and a recording, editing and/or playback apparatus using the same.
2. Description of the Related Art
Packet data is usually used in digital satellite broadcasting, digital terrestrial broadcasting, digital cable broadcasting and asynchronous transfer mode (ATM) transmission networks. FIG. 1 shows the basic form of recorded data composed of input packet data and its arrival time and the conceptual relation between the recorded data and data output time intervals during playback. When recording input data, an arrival time stamp (ATS), which is arrival time information, is added to the input data and the data is output based on the added ATS during playback. Here, the input data is packetized data which is obtained by dividing data such as video or audio into units of a predetermined size. The packetized data is transmitted through satellites, cables or local area networks (LANs). The size of the unit is 188 bytes when data is transmitted using a Moving Picture Experts Group (MPEG)-2 transport stream defined by International Organization for Standardization (ISO)/International Electrotechnical Commission (IEC) 13818-1 standard, and is 53 bytes when data is transmitted using an asynchronous transfer mode (ATM) standard.
In digital broadcasting, packet data is transmitted at irregular time intervals. The transmitted packet data is usually received by a receiving party having a decoder. In the receiving party, the transmitted data is input into the decoder via a buffer and decoded by the decoder so that users can watch the broadcasting.
When a user sets a playback mode to reproduce, at a desired time, packet data, which has been temporarily stored in a recording medium, the packet data is sent to the decoder by a playback apparatus. When sending the data to the decoder, the irregular time intervals at which the packet data was originally transmitted to the receiving party are significant because the buffer of the receiving party overflows or underflows if the irregular time intervals are not obeyed. This is because, when transmitting data, an original transmitting party (a broadcasting station) adjusts the time intervals between packet data taking into account the state of the buffer of a receiving party having a decoder. For this reason, it is assumed that information on the arrival time of each packet of data is added to each corresponding packet of input data when a recording apparatus records data, and each packet of data is output by a playback apparatus based on the arrival time information thereof.
FIG. 2 is a block diagram showing a recording and playback apparatus for the packet data shown in FIG. 1. In FIG. 2, a counter 102, which operates according to a system clock signal, usually uses a system clock signal of 27 MHz because the MPEG-2 system generates time stamps on the basis of a clock signal of 27 MHz. It is needless to say that a system clock signal of another frequency can be used.
An ATS generator 104 adds an ATS to each packet of input data. The input packet data together with the added ATSs is converted into a signal suitable for recording by a recording controller 106 and then recorded in a recording medium 108. A playback controller 110 plays back the packet data, to which ATSs have been added, which is recorded in the recording medium 108, and sends the playback data to an ATS processor 112. The ATS processor 112 outputs the data according to the added ATS of the playback data. Here, the ATS generator 104 and the ATS processor 112 each includes an internal buffer. Alternately, the buffers of the ATS generator 104 and the ATS processor 112 may be separately provided on the outside.
In the method of adding an ATS, during recording, the ATS generator 104 reads a count value of the counter 102 at the time when packet data is input, and adds the count value to the packet as an ATS. The packet data with the added ATS is temporarily stored in the internal buffer of the ATS generator 104 and then recorded in the recording medium 108 via the recording controller 106. As mentioned above, the internal buffer can be separately provided on the outside.
During playback, the playback controller 110 plays back the packet data with the added ATS from the recording medium 108 and sends the playback data to the ATS processor 112. The ATS processor 112, which includes a buffer of a predetermined size, temporarily stops reading data when the buffer overflows, and restarts the reading when the buffer is empty, repeatedly. The ATS processor 112 reads the ATS and corresponding packet data of a first packet, from its internal buffer, and sets the counter 102 based on the ATS while outputting the packet data. The output data of the ATS processor 112 is pure packet data from which the ATS has been removed. Thereafter, packet data is output only when the added ATS of the packet is determined to have the same value as the count value of the counter 102 by comparing the ATS with the count value. The buffer included in the ATS processor 112 may also be separately provided on the outside. Due to such configuration and operation as described above, data can be transmitted to a receiving party having a decoder while the original time intervals of packet data are maintained during playback so that decoding can be smoothly performed.
As shown in FIGS. 1 and 2, when recording packet data, an ATS, which indicates the arrival time of the corresponding packet data, is added to the packet data. A data stream which is recorded in such a manner is referred to as a stream object (SOB). A plurality of SOBs may be recorded in a single recording medium. For example, when a user starts and stops recording one time, one SOB is generated. Thereafter, if the user starts and stops recording again, another SOB is generated. A data stream is data which is recorded starting from the time when a user starts recording through the time when the user stops recording. For example, a piece of drama or movie can be recorded in the form of a single data stream.
An ATS is important in an apparatus for recording packet data. Generally, ATSs are added to a data stream, independently from those which are added to other data streams. The independent method is possible when seamless playback is required only with respect to a single data stream. However, when a user desires to seamlessly reproduce two or more data streams, additional information for defining the seamless playback between the data streams is needed.
FIG. 3 shows an example in which two data streams are reproduced by the recording and playback apparatus shown in FIG. 2. In a preceding data stream, SOB 1, the values of ATSs are written from “100” to “990.” In a succeeding data stream SOB 2, the values of ATSs are written starting from “0.” This is because, the ATS generator 104 sets an initial value to “100,” which is the value of the ATS of packet data which arrives first in the SOB 1, and records the SOB 1 during the recording of the SOB 1 while the ATS generator 104 sets an initial value to “0,” which is the value of the ATS of packet data which arrives first in the SOB 2, regardless of the values of the ATSs in the SOB 1, and records the SOB 2 during the recording of the SOB 2. When sequentially reproducing the two data streams which have been recorded through the above operation, the value of the counter 102 is compared with the values of ATSs of the SOB 1 during the playback of the SOB 1 and, after completing the playback of the SOB 1, the counter 102 is reset to “0” to reproduce the SOB 2.
In the operation of sequentially reproducing the two data streams, SOB 1 and SOB 2, information for defining the seamless playback between the SOB 1 and the SOB 2, for example, the time interval between the end of playback of the SOB 1 and the start of playback of the SOB 2, is not defined. In other words, as shown in FIG. 3, a single SOB is reproduced in such a manner that the counter 102 is reset to the value of the ATS of the first packet data of SOB 1 and then the value of ATSs of packet data are compared with the count value of the counter 102 until an ATS having the same value as that of the counter 102 is searched, so as to output packet data to which the searched ATS has been added. Once the playback of the SOB 1 is completed, the playback of the SOB 2 is performed in the same manner as in the playback of the SOB 1 after the counter 102 is reset to the value of the ATS of the first packet of the SOB 2. At this time, the seamless playback between the SOB 1 and the SOB 2 is not particularly defined so that the playback operation is usually stopped for a short time.
When sequentially reproducing SOBs, the time intervals between SOBs cannot be equally fixed because the time intervals depend on internal data states. Accordingly, information on playback time control in accordance with the internal data states is needed. Without this information, seamless playback cannot be guaranteed and a small time delay appears between two SOBs.
FIG. 4A shows a case in which ATSs are added to the plurality of SOBs for the purpose of seamless playback and shows a discontinuous section which is caused by partial deletion of data. In other words, during recording, instead of adding ATSs to SOB 2 independently from those in SOB 1, the ATSs are added to SOB 2 taking into account the value of the last ATS of SOB 1 and a current data state so that seamless playback can be achieved. During playback, the counter 102 is not reset between the two SOBs and the playback of the two SOBs is performed as though a single SOB is being reproduced, thereby guaranteeing automatic seamless playback. In this case, the two SOBs are seamlessly reproduced according to the ATSs without resetting of the counter 102 between the two SOBs during playback. However, seamless playback may not be guaranteed when partial deletion, which occurs frequently in using a recording and playback apparatus, is performed.
For example, if a portion of SOB 2 is deleted at the boundary between the SOB 1 and the SOB 2, output of data, as shown in FIG. 4B, is not performed for a period of time corresponding to the amount of deleted data. This is because the value of the counter 120 is not reset at the boundary between the two SOBs. If the counter 102 is reset to the value of the ATS of the first packet of SOB 2, the problem can be solved, but there occurs a problem that the seamless playback between two SOBs is not defined as shown in FIG. 3.
In another method, as shown in FIG. 4C, all the ATSs of the SOB 2 are modified into values for allowing seamless playback. However, it is troublesome to modify all the ATSs of SOB 2 during recording.
In brief, when sequentially reproducing the two data streams, SOB 1 and SOB 2, to which the ATSs are independently added as shown in FIG. 3, the ATS processor 112 resets the counter 102 to the value of the first ATS of the SOB 2 immediately after a predetermined amount of time has passed since the playback of the SOB 1 was completed, and starts the playback of the SOB 2. Consequently, seamless playback is not guaranteed and playback is interrupted.
Even if the ATS generator 104 generates ATSs for allowing seamless playback when recording the SOB 2 after completing the recording of the SOB 1 as shown in FIG. 4A, seamless playback is impossible when editing is performed, that is, a portion of the SOB 1 or SOB 2 is deleted at the boundary between the two SOBs. According to the method as shown in FIG. 4C, it is difficult to modify the values of the ATSs of the SOB 2 after recording or editing and to record the modified values again.